<?php

namespace app\modules\backend\widget;
use app\modules\frontend\widget\BaseWidget;
use Yii;

/**
 * Created by PhpStorm.
 * User: BobWong
 * Date: 16/3/21
 * Time: 下午3:09
 */

class ImageUploadWidget extends BaseWidget {

    /** @var $placeholder string  */
    public $placeholder = '';
    public $form = null;
    public $model = null;
    public $field_id = '';

    public function run() {
        return $this->render('widget/_image_upload', [
            'placeholder' => $this->placeholder,
            'form' => $this->form,
            'model' => $this->model,
            'filed_id' => $this->field_id,
        ]);
    }

    public function getViewPath() {
        return '@app/modules/backend/views';
    }
}